import { defHttp } from '/@/utils/http/axios';

enum Api {
  list = '/api-iot/iot/mq/consumer/instruction/list',
  save = '/api-iot/iot/mq/consumer/instruction/saveOrUpdate',
  delete = '/api-iot/iot/mq/consumer/instruction/delete',
  queryById = '/api-iot/iot/mq/consumer/instruction/queryById',
}
/**
 * 列表
 * @param params
 */
export const list = (params) => {
  return defHttp.get({ url: Api.list, params });
};
/**
 * 删除
 * @param params
 */
export const deleteInstruct = (params) => {
  return defHttp.post({ url: Api.delete, params });
};
/**
 * 保存
 * @param params
 */
export const saveOrUpdateInstruct = (params) => {
  return defHttp.post({ url: Api.save, params });
};

/**
 * 查询
 * @param params
 */
export const getInstructById = (params) => {
  return defHttp.get({ url: Api.queryById, params });
};